/* Structure for a pyramid slot - which can hold one card */
typedef struct pcell {
    int id;			/* Cell number */
    int depth;			/* Depth of cell. bottom row has depth zero */
    int stack;			/* ID of stack of cards currently in the cell */
    struct pcell *over[2];	/* Pointers to pcells this cell covers */
    struct pcell *under[2];	/* Pointers to pcells that cover this cell */
    struct pcell *next, *prev;	/* Links in chain of "top" cards */
} PCell;

typedef struct {
    int npyr;		/* Number of pcells in the pyramid */
    int nrow;		/* Number of rows of pcells in the pyramid */
    int *len;		/* Array of row lengths */
    int *first;		/* ID of first cell in each row */
    PCell **pyr;	/* Array of npyr pcells, indexed by cell numbers */
    PCell *pyrtop;	/* Head of list of "top" cards */
} Pyramid;
